/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 24-04-2009
 * Time: 13:37
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Text.RegularExpressions;
namespace Plain
{
	/// <summary>
	/// Description of StringExtensions.
	/// </summary>
	public static class StringExtensions{
		public static bool IsNullOrEmpty(this string s){
			return string.IsNullOrEmpty(s);
		}
		public static bool IsSomething(this string s){
			return !string.IsNullOrEmpty(s);
		}
		public static string FormatString(this string s,params object[] o){
			return string.Format(s,o);
		}
		public static bool Matches(this string s, string pattern){
			Regex regex = new Regex(pattern);
			return regex.IsMatch(s);
		}
		
	}
}
